/********************************************************************
	created:	2014/08/06
	created:	6:8:2014   11:58
	filename: 	win32
	file ext:	h
	author:		liyiysngg@gmail.com
	
	purpose:	Win32 specific config options:
	
	remarks:	
*********************************************************************/


#define XLL_PLATFORM "Win32"

//  Get the information about the MinGW runtime, i.e. __MINGW32_*VERSION.
#if defined(__MINGW32__)
#  include <_mingw.h>
#endif

#if defined(__GNUC__) && !defined(XLL_NO_SWPRINTF)
#  define XLL_NO_SWPRINTF
#endif

//  Default defines for XLL_SYMBOL_EXPORT and XLL_SYMBOL_IMPORT
//  If a compiler doesn't support __declspec(dllexport)/__declspec(dllimport),
//  its config/compiler/ file must define XLL_SYMBOL_EXPORT and
//  XLL_SYMBOL_IMPORT
#ifndef XLL_SYMBOL_EXPORT
#  define XLL_HAS_DECLSPEC
#  define XLL_SYMBOL_EXPORT __declspec(dllexport)
#  define XLL_SYMBOL_IMPORT __declspec(dllimport)
#endif

#if defined(__MINGW32__) && ((__MINGW32_MAJOR_VERSION > 2) || ((__MINGW32_MAJOR_VERSION == 2) && (__MINGW32_MINOR_VERSION >= 0)))
#  define XLL_HAS_STDINT_H
#  ifndef __STDC_LIMIT_MACROS
#     define __STDC_LIMIT_MACROS
#  endif
#  define XLL_HAS_DIRENT_H
#  define XLL_HAS_UNISTD_H
#endif

#if defined(__MINGW32__) && (__GNUC__ >= 4)
#  define XLL_HAS_EXPM1
#  define XLL_HAS_LOG1P
#  define XLL_HAS_GETTIMEOFDAY
#endif
//
// Win32 will normally be using native Win32 threads,
// but there is a pthread library avaliable as an option,
// we used to disable this when XLL_DISABLE_WIN32 was 
// defined but no longer - this should allow some
// files to be compiled in strict mode - while maintaining
// a consistent setting of XLL_HAS_THREADS across
// all translation units (needed for shared_ptr etc).
//

#ifdef _WIN32_WCE
#  define XLL_NO_ANSI_APIS
#else
#  define XLL_HAS_GETSYSTEMTIMEASFILETIME
#endif

#ifndef XLL_HAS_PTHREADS
#  define XLL_HAS_WINTHREADS
#endif

#ifndef XLL_DISABLE_WIN32
// WEK: Added
#define XLL_HAS_FTIME
#define XLL_WINDOWS 1

#endif
